//
//  CSWHallViewController.m
//  网易彩票
//
//  Created by MAC on 16/6/5.
//  Copyright © 2016年 MAC. All rights reserved.
//

#import "CSWHallViewController.h"

#import "UIImage+Image.h"

#import "CSWCoverView.h"
#import "CSWPopMenu.h"

@interface CSWHallViewController()<CSWPopMenuDelegate>

@end

@implementation CSWHallViewController

- (void)viewDidLoad{
    
    UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithImage:[UIImage imageWithOriginalImageName:@"CS50_activity_image"] style:0 target:self action:@selector(activity)];
    
    self.navigationItem.leftBarButtonItem = item;
//    self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
}

- (void)activity{
    [CSWCoverView show];
    
    CGFloat screenX = [UIScreen mainScreen].bounds.size.width / 2;
    CGFloat screenY = [UIScreen mainScreen].bounds.size.height / 2;
    CSWPopMenu *menu = [CSWPopMenu showInPoint:CGPointMake(screenX, screenY)];
    menu.delegate = self;
}

- (void)popMenuDidClickClose:(CSWPopMenu *)popMenu{
    
    [popMenu hideInPoint:CGPointMake(44, 44) complete:^{
        [CSWCoverView hide];
    }];
    
}
@end
